package com.dlb.andorid.activity;

import com.kwan.xframe.mvp.presenter.BasePresenter;
import com.kwan.xframe.mvp.view.activity.BaseWebActivity;


public class WebActivity extends BaseWebActivity {

	String title;

	@Override
	protected BasePresenter getBasePresenter() {
		return null;
	}

	@Override
	protected void beForeSetContentView() {
		super.beForeSetContentView();
		mUrl = (String) getIntentData("url");
		title = (String) getIntentData("title");
	}

	@Override
	protected String getUrl() {
		return mUrl;
	}

	@Override
	protected void initViews() {
		super.initViews();

	}

	@Override
	protected void initData() {

		showProgress("");

		switch ((int) getIntentData("mode")) {
			case MODE_WEB:
				loadWeb(mUrl);
				break;
			case MODE_CONTENT:
				loadContent(mUrl);
				break;

		}
	}

	@Override
	protected int getMode() {
		return MODE_WEB;
	}

	@Override
	protected int getTopViewId() {
		return 0;
	}

	@Override
	protected int getBottomViewId() {
		return 0;
	}

	@Override
	protected String getTitleTxt() {
		return title;
	}

	@Override
	public void onBackPressed() {
		finish();
	}

	@Override
	public String getPageName() {
		return null;
	}
}
